import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';


async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  return app;

}

const isLocal = process.env.NODE_ENV === 'local'
if(isLocal){
  bootstrap().then(app => {
    app.listen(3000, () => {
      console.log(`Server start on http://localhost:3000`)
    })
  })
}


export {bootstrap}
